phy_speed_y

The y component of the speed vector.

语法:

phy_speed_y;


返回: Real(实数)


描述

This variable can be used to get or to change the y component the instances linear speed vector and is defined in pixels per step (for pixels per second, see phy_linear_velocity_y). Altering this for a static instance (ie: an instance with 0 density) will turn it into a kinematic instance.


例如:

if phy_speed_y != 0
   {
   phy_speed_y = 0;
   }

The above code will check the y component of the linear speed vector and if it is anything other than 0 it will set it to 0.


上一页: Physics Variables
next: phy_position_x
© Copyright YoYo Games Ltd. 2018 All Rights Reserved